<!DOCTYPE html>
<html  lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0,maximum-scale=1. ,user-scalable=no" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>
<body>
	<div class="container">
		<img class="img-bg" src="img/top_01.png?v1" />
		<div class="uni-logo">
			<img class="img_1" src="img/top_02.png" alt="" />
			<img class="img_2" :src="surimg" />
		</div>
		<h1 class="title">共筑诚信&nbsp;我在行动</h1>
		<div class="choose">
			<button class="j-chose" @click="showDetail">选择我的公寓</button>
			<button class="j-share" @click="showShare">分享到朋友圈</button>
		</div>
		<div v-if="shareShow" class="goshare" @click="hideShare">
			<img src="img/share_arrow.png">
			<div class="info">点击这里分享</div>
		</div>
		<div v-if="detailShow" class="select">
			<!--<input type="text" v-model='search' class="select-text"/>-->
			<div class="input-panel clearfix">
                <div class="iremove-box j_remove" style="display: block;"><i v-show="search.length > 0" class="icon iremove" @click="clear"></i></div>
                <div class="isearch-box j_search"><i class="icon isearch"></i></div>
                <input type="text" v-model='search' class="select-text" placeholder="搜索公寓" value="">
            </div>
            <div class="close-panel" @click="hideDetails">
            	<span class="close">关闭</span>
            </div>
		    <ul ref="mybox">
		        <li v-for="(index, item) in searchData" @click="choose" :data-img="item.img" :data-index="item.index">{{item.name}}</li>
		    </ul>
		</div>
		<div class="show_more">
			<img class="img_3" src="img/jiantou.png"/>
			<div class="app clearfix">
		        <div class="content"  v-for="img in imgs" >
		            <img :src="img" style="display:block;width:100%;">    
		        </div>
		    </div>
		</div>
		<img class="img_4" src="img/top_03.png"/>
	</div>
    <script src="js/jquery-2.1.4.min.js"></script>
    <script src="js/vue.js"></script>
    <script src="js/vue-resource.js"></script>
	<script src="js/index.js"></script>

	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="js/sha.js"></script>
    <script src="js/share.js?t=2"></script>
<script type="text/javascript">
	function initshar() {
		var atitle =   "中国诚信公寓联盟";
		var wxcontext =  "我已加入中国诚信公寓联盟，共筑诚信，我在行动！";
		var sharelink  = "http://www.luobolieshou.com/gongyu/gongyu/index.html?p=" + (pid || 0);
		var shareimg =  "http://www.luobolieshou.com/lblsapp-web/public/luobo/images/111.png";

		wx.onMenuShareAppMessage({
		    title: atitle, // 分享标题
		    desc: wxcontext, // 分享描述
		    link: sharelink, // 分享链接
		    imgUrl: shareimg, // 分享图标
		    type: 'link', // 分享类型,music、video或link，不填默认为link
		    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
		    success: function () {
		    	shareSud();
		    },
		    cancel: function () {
		    }
		});
		wx.onMenuShareTimeline({
		    title: atitle, // 分享标题
		    link: sharelink,
		    imgUrl: shareimg,
		    success: function () {
		    	shareSud();
		    }
		});
		
		wx.onMenuShareQQ({
		    title: atitle, // 分享标题
		    desc: wxcontext, // 分享描述
		    link: sharelink, // 分享链接
		    imgUrl: shareimg, // 分享图标
		    success: function () { 
		    	shareSud();
		    },
		    cancel: function () { 
		    }
		});
		
		wx.onMenuShareWeibo({
		    title: atitle, // 分享标题
		    desc: wxcontext, // 分享描述
		    link: sharelink, // 分享链接
		    imgUrl: shareimg, // 分享图标
		    success: function () {
		    	shareSud();
		    },
		    cancel: function () { 
		    }
		});
		wx.onMenuShareQZone({
		    title: atitle, // 分享标题
		    desc: wxcontext, // 分享描述
		    link: sharelink, // 分享链接
		    imgUrl: shareimg, // 分享图标
		    success: function () {
		    	shareSud();
		    },
		    cancel: function () { 
		    }
		});
		
		wx.showOptionMenu();
	}

	function isWeiXinNavigator(){
	    var ua = window.navigator.userAgent.toLowerCase();
	    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
	    	return true;
	    }else{
	    	return false;
	    }
	}
	if(!isWeiXinNavigator()) {
		// alert("请使用微信打开");
	} else {
	    wx.ready(function(){
			initshar();
		});
	}
</script>
<style>
/* fix css load sequence */
.select {display: block;}
</style>
</body>
</html>